package com.bp.hearthealth.pulse.lnapps.ads.topon.open_ad.listener.ad_action

import android.content.Context
import com.anythink.core.api.ATAdInfo
import com.anythink.core.api.ATNetworkConfirmInfo
import com.bp.hearthealth.pulse.lnapps.BpApplication
import com.ironsource.fa

interface TopOnOpenAdListener {
    //加载未超时时
    fun onAdLoaded() {}

    //加载超时后，直接进入主界面
    fun onAdLoadTimeout() {}

    //加载失败直接进入主界面
    fun onNoAdError() {}

    fun onAdShow() {}

    fun onAdClick() {}

    //开屏广告展示关闭后进入主界面
    //注意：部分平台跳转落地页后倒计时不暂停，即使在看落地页，倒计时结束后仍然会回调onAdDismiss
    //（1）当穿山甲、优量汇的开屏广告素材支持点睛时，splashEyeAd不为null
    //（2）当展示的是快手开屏广告时，splashEyeAd为非null值，但不一定表示此次快手开屏广告的素材支持点睛，不支持时调用IATSplashEyeAd#show()方法会直接回调ATSplashEyeAdListener#onAdDismiss()方法
    //（3）当splashEyeAd不为null，但是开发者不想支持点睛功能时，必须调用splashEyeAd.destroy()释放资源，然后跳转主页面或者移除开屏View

    fun onAdDismiss() {}

    fun onDeeplinkCallback(entity: ATAdInfo, isSuccess: Boolean) {}

    fun onDownloadConfirm(
        context: Context,
        adInfo: ATAdInfo,
        networkConfirmInfo: ATNetworkConfirmInfo
    ) {
    }

    fun onFireBaseAdIsClosed() {}
    fun onNotReady() {}
}